home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000107_icon-group-sender _Fri Jun 26 15:40:05 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id PAA16803
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Fri, 26 Jun 1998 15:40:04 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA30768; Fri, 26 Jun 1998 15:39:53 -0700
  7. Sender: rwg@fns.com
  8. Message-Id: <3593FF9A.4A241736@fns.com>
  9. Date: Fri, 26 Jun 1998 16:07:54 -0400
  10. From: Robbie Gilbert <rwg@fns.com>
  11. Organization: Fujitsu Network Communications
  12. X-Mailer: Mozilla 4.05 [en] (X11; I; SunOS 5.5.1 sun4u)
  13. Mime-Version: 1.0
  14. To: icon-group@optima.CS.Arizona.EDU
  15. Subject: Forcing Generator to Return a List of Values
  16. Content-Type: text/plain; charset=us-ascii
  17. Content-Transfer-Encoding: 7bit
  18. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  19. Status: RO
  20. Content-Length: 1016
  21.  
  22. Hi,
  23.  
  24. I have a newbie question:
  25.  
  26. I would like to know if there is a function or procedure
  27. that will repeatedly evaluate an expression which is a
  28. generator and return ALL the results in a list.  I could
  29. write such a procedure very easily (maybe only 2
  30. lines?) using the every-do control structure but if there is
  31. one already in the program library, I would prefer to use
  32. the standard.
  33.  
  34. I found evallist but that seems to construct an entire
  35. program and exec it which seems expensive for my purposes.
  36. I also checked list construction and type conversion to see
  37. if there was a way to "force" a list context around an
  38. expression evaluation but couldn't find any.  I want to
  39. assign the list of values and since assignment only takes
  40. the first value, things like "| expr" only seem to produce
  41. one value.  I need some intervening procedure or function to
  42. "collect" all the values generated.  The list constructor
  43. doesn't do the job since it only evaluates its second
  44. argument, the expr, once.
  45.  
  46. Robbie Gilbert
  47. rwg@fns.com
  48.  
  49.  
  50.